<?php
   require_once "controller.php";
   require_once "Model/orderModel.php";
   class OrderController extends Controller{
   	   function __construct(){
            parent::__construct();
   	   	   $this->mod=new OrderModel();
   	   }
       //显示用户列表
   	   public function listorders(){
        $orderdata=$this->mod->getOrderList();//调用模型层的方法获得数据
      
   	     $this->assign("orders",$orderdata);
        
           $this->display();
   	   }
       public function delorder(){
        $result=$this->mod->delOrderInfo();
        if($result==true){
          echo '删除成功！<br>';
          header("refresh:3;index.php?c=order&m=listorders");
          echo ' <a href="index.php?c=order&m=listorders">如果没有跳转，请点这里跳转</a>';
        }

      }
       
       
   }//class Usercontroller end


?>